package com.rain.service;

import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.service.IService;
import com.rain.dto.user.UserLoginRequest;
import com.rain.dto.user.UserQueryRequest;
import com.rain.dto.user.UserRegisterRequest;
import com.rain.entity.User;
import com.rain.vo.LoginUserVo;
import com.rain.vo.UserVo;
import com.rain.entity.User;
import jakarta.servlet.http.HttpServletRequest;

import java.util.List;

/**
 *  服务层。
 *
 * @author <a href="https://github.com/liyupi">程序员刘诗雨</a>
 */
public interface UserService extends IService<User> {
    long userRegister(UserRegisterRequest userRegisterRequest);

    LoginUserVo getLoginUserVo(User user);
    String getEncryptPassword(String password);

    LoginUserVo userlogin(UserLoginRequest userLoginRequest, HttpServletRequest request);

    User getLoginUser(HttpServletRequest request);

    boolean loginOut(HttpServletRequest request);

    UserVo getUserVo(User user);

    List<UserVo> getUserVoList(List<User> userList);

    QueryWrapper getQueryWrapper(UserQueryRequest userQueryRequest);
}
